% 
function new = Variation(old, pm)
[rows cols] = size(old);
for i = 1:rows
    for j = 1:cols
        if(rand < pm)
            old(i,j) = ~old(i,j); 
        end
    end
end
new = old;
